<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use dosamigos\datepicker\DatePicker;
use backend\models\EduFeedback;

/* @var $this yii\web\View */
/* @var $model backend\models\EduFeedbackSearch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="edu-feedback-search form-inline">

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
//        'options' => [
//                'template' => "{label}\n{input}\n{hint}"
//        ],
        'fieldConfig' => [
            'template' => "{label}\n{input}\n{hint}"
        ],
    ]); ?>

<!--    --><?//= $form->field($model, 'user_id') ?>

<!--    --><?//= $form->field($model, 'desc') ?>

    <?= $form->field($model, 'contact') ?>

    <?= $form->field($model, 'create_time_start')->widget(
            DatePicker::className(), [
                'inline' => false,
                'language' => 'zh-CN',
                'clientOptions' => [
                    'autoclose' => true,
                    'format' => 'yyyy-m-d'
                ],
        ]
    ) ?>

    <?= $form->field($model, 'create_time_end')->widget(
        DatePicker::className(), [
            'inline' => false,
            'language' => 'zh-CN',
            'clientOptions' => [
                'autoclose' => true,
                'format' => 'yyyy-m-d'
            ],
        ]
    )  ?>

    <?= $form->field($model, 'status')->dropDownList(EduFeedback::allStatus()) ?>

    <div class="form-group">
        <?= Html::submitButton('搜索', ['class' => 'btn btn-primary']) ?>
        <?= Html::resetButton('重置', ['class' => 'btn btn-default clear']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
<?php
$script = <<< JS
    $('.clear').click(function() {
        location.href = "index.php?r=edu-feedback";
    });
JS;
$this->registerJs($script);
?>
